<template>
  <div class="footer bg-fff aic">
    <router-link active-class="on" to="/product" class="flex fdc">
      <van-icon name="home-o" size="18" />
      <span class="f12">首页</span>
    </router-link>
    <router-link active-class="on" to="/classify" class="flex fdc">
      <van-icon name="goods-collect-o" size="18" />
      <span class="f12">分类</span>
    </router-link>
    <router-link active-class="on" to="/cart" class="flex fdc">
      <van-icon name="cart-o" size="18" />
      <span class="f12">购物车</span>
    </router-link>
    <router-link active-class="on" to="/my" class="flex fdc">
      <van-icon name="friends-o" size="18" />
      <span class="f12">我的</span>
    </router-link>
    
    <!-- 测试用的，后期再删除 -->
    <!-- <router-link active-class="on" to="/demo" class="flex fdc">
      <van-icon name="setting-o" size="18" />
      <span class="f12">demo</span>
    </router-link> -->
  </div>
</template>

<script>
export default {
  data() {
    return {
      tab: '首页',
    }
  },
  created() {
    // console.log('footer组件')
  },
}
</script>

<style lang="less" scoped>
.footer {
  position: fixed;
  bottom: 0;
  height: 50px;
  width: 100%;
  display: flex;
  justify-content: space-around;
  span,
  .van-icon {
    color: #797d82;
  }

  .on {
    span,
    .van-icon {
      color: #c03131;
    }
  }
}
</style>
